import './index.scss'
import './components/z-dialog/index.scss'

import cZTable from "./components/z-table/index";
import ZFormTemplate from "./components/z-form-template";
import ZSearchTable from "./components/z-datatable/ZSearchTable";
import ZSpace from "./components/z-space";
import ZUpload from "./components/z-upload/ZUpload";
import ZFields from "./components/z-fields/ZFields";
import ZTree from "./components/z-tree/ZTree";
// import ZCrudTable from "./components/z-datatable/ZCrudTable";
import {installZlayout} from "./components/z-Layout/ZLayout";
import VueElementDialog from './components/z-dialog/index';
// import VueElementPopover from './components/z-popover/index';
import ZCard from "./components/z-card/ZCard";
import ZCalendar from "./components/z-calendar/ZCalendar";
import ZDataGrid from "./components/z-data-grid/ZDataGrid";
import ZPanel from "./components/z-panel/ZPanel";
import ZDataGridForm from "./components/z-data-grid/ZDataGridForm";
import {installRightMenu} from "./components/z-right-menu";
import ZDropdownMenu from "./components/z-dropdown/ZDropdownMenu";

import ZTabPane from "./components/z-tabs/ZTabPane";
import ZRenderJsx from "./components/z-common/ZRenderJsx";
// import ZCrudPage from "./components/z-pages/ZCrudPage";


// import Quill from 'quill'
// import 'quill/dist/quill.snow.css'

export function install(Vue, ELEMENT) {
    // globalThis.Quill = Quill


    // Vue.use(VueMask);
    installZlayout(Vue);
    // Vue.use(VueElementDialog)
    VueElementDialog(Vue)
    // VueElementPopover(Vue);
    installRightMenu(Vue)
    Vue.prototype.Z_GET = function (v, path, defaultVal) {
        return ZY.lodash.get(v, path, defaultVal)
    }
    Vue.prototype.Z_EMIT = function (name, ...args) {
        this.$emit.apply(this, [name, ...args])
    }
    // console.log(Vue)
    let ZTable = cZTable(ELEMENT)
    Vue.component(ZDropdownMenu.name, ZDropdownMenu)
    Vue.component(ZDataGrid.name, ZDataGrid)
    Vue.component(ZDataGridForm.name, ZDataGridForm)
    Vue.component(ZUpload.name, ZUpload)
    Vue.component(ZFields.name, ZFields)
    Vue.component(ZTree.name, ZTree)
    Vue.component(ZFormTemplate.name, ZFormTemplate);
    // Vue.component(ZCrudTable.name, ZCrudTable);
    Vue.component(ZRenderJsx.name, ZRenderJsx);
    Vue.component(ZSearchTable.name, ZSearchTable);
    // Vue.component(ZCrudPage.name, ZCrudPage)
    Vue.component(ZTabPane.name, ZTabPane)
    Vue.component(ZTable.name, ZTable);
    Vue.component(ZSpace.name, ZSpace);
    Vue.component(ZCard.name, ZCard);
    Vue.component(ZPanel.name, ZPanel);
    Vue.component(ZCalendar.name, ZCalendar)
}


export * as Mixins from './mixins'


let ZPKGS_COMPONENTS = {
}
// globalThis.ZPKGS_COMPONENTS = ZPKGS_COMPONENTS
export default ZPKGS_COMPONENTS

